package com.xx.springboot.controller;/**
 * Created by xiaoxiunique on 2018-11-20.
 */

import com.xx.springboot.entity.User;
import org.apache.shiro.SecurityUtils;

/**
 * <p>
 * TODO:
 * </p>
 *
 * @author hcg
 * @date 2018-11-20 11:31
 * @className AbstractController
 */
public abstract class AbstractController {
    public User getUser() {
        User user = (User) SecurityUtils.getSubject().getPrincipal();
        return user;
    }
}
